Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

375
Views
Docker Build Failing on Travis --> can't find app/build

I am trying to push my images from Travis CI to docker hub.

Here is my Dockerfile

FROM node:alpine as builder 
WORKDIR /app
COPY ./package.json ./
RUN npm install
COPY . .
CMD npm run build


FROM nginx
EXPOSE 3000
COPY ./nginx/default.conf /etc/nginx/conf.d/default.conf
COPY --from=builder /app/build /usr/share/nginx/html

My .travis.yml

sudo: required
services:
  - docker

before_install:
  - docker build -t aseel/react-test -f ./client/Dockerfile.dev ./client

script:
  - docker run -e CI=true aseel/react-test npm run test

after_success:
  - docker build -t aseel/multi-client ./client
  - docker build -t aseel/multi-nginx ./nginx
  - docker build -t aseel/multi-server ./server
  - docker build -t aseel/multi-worker ./worker
  - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_ID" --password-stdin
  - docker push aseel/multi-server
  - docker push aseel/multi-nginx
  - docker push aseel/multi-worker
  - docker push aseel/multi-client

The reason the push is failing is because this command

docker build -t aseel/multi-client ./client

is failing on travis (but not locally).

More specifically, I'm getting this error on travis

COPY failed: stat /var/lib/docker/overlay2/135282513e177be132b6978986f878ba61f3b89914b6b2f7030cbafa0d33f629/merged/app/build: no such file or directory

Any idea why this is happening?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

I needed to switch CMD to RUN -- It was a pretty silly mistake

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!